package cn.edu.scau.cmi.zhuangzhihong.adapter;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;

import javafx.scene.control.Button;

import javafx.scene.control.TextField;

public class scenceController1 {
	@FXML
	private Button bt1;
	@FXML
	private Button bt2;
	@FXML
	private Button bt3;
	@FXML
	private TextField text;

	@FXML
	public void eventbtn1(ActionEvent event) {
		adaptee a = new adaptee();
		String vol = String.valueOf(a.op());
		text.setText(vol);
		System.out.println(vol);
	}
	
	@FXML
	public void eventbtn2(ActionEvent event) {
	    plg ac = new AdapterOfClass();
		String vol = String.valueOf(ac.voltage());
		text.setText(vol);
		System.out.println(vol);
	}
	
	@FXML
	public void eventbtn3(ActionEvent event) {
		plg ao = new AdapterOfObject();
		String vol = String.valueOf(ao.voltage());
		text.setText(vol);
		System.out.println(vol);
	}
	
	
}
